import {extendObservable, computed} from 'mobx'

class OrderLine {
    constructor(price) {
        extendObservable(this, {
            price: price,
            amount: 1,
            get total() {
                return this.price * this.amount
            },
            // total: computed(function() {
            //     return this.price * this.amount
            // })
        })
    }
}

export default OrderLine